<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>友盟留存配置</title>
<link href="/resources/js/easyui-1.4/themes/default/easyui.css" rel="stylesheet"/>
<link href="/resources/js/easyui/themes/icon.css" rel="stylesheet"/>
<script type="text/javascript" src="/resources/js/easyui/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/resources/js/easyui-1.4/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/resources/js/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="/resources/js/easyui/jquery.edatagrid.js"></script>
<script type="text/javascript" src="/resources/js/easyui/datagrid-dnd.js"></script>
</head>
<body class="cmp-list-body">
<div id="tb" style="padding:3px">
 	应用名称:<span id="apkName"></span>
	<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="selectApp();">选择应用</a>
	<input id="appInfoId" name="appInfoId" type="hidden"></input>
	<span>渠道：</span>
	<input id="channel" class="easyui-textbox" style="width: 200px;" name="channel"/>
 	<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="javascript:doSearch()">查询</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save" plain="true" onclick="javascript:saveRow()">保存</a>
    <a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="javascript:addRow()">新增</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="javascript:remove()">删除 </a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-undo" plain="true" onclick="javascript:$('#tt').edatagrid('cancelRow')">取消</a>
    <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="javascript:selectAll()">全选</a>
</div>
<table id="tt" class="easyui-datagrid" title="留存配置列表" iconCls="icon-save" toolbar="#tb" rownumbers="true" 
    singleSelect="false" fitColumns="true""> 
    <thead>
        <tr>
       		<th field='id' >id</th>
       		<th field='apkName' width=15% >应用名称</th>
       		<th field='channel' width=15% ">channel</th>
            <th field='retentDay' width=8% data-options="editor:{type:'validatebox'}">留存天数</th>
            <th field='configDay' width=8% >天</th>
            <th field='retentRate' width=8% data-options="editor:{type:'validatebox'}">占比（%）</th>
            <th field='exetimes' width=8% data-options="editor:{type:'validatebox'}">执行次数</th>
            <th field='priority' width=8% data-options="editor:{type:'validatebox'}">优先级</th>
            <th field='total' width=8% >需要执行量</th>
            <th field='execTotal' width=8% >已执行量</th>
        </tr>
    </thead>   
</table>
<div id="win" class="easyui-window" title="提示" closed="true" style="width:300px;height:100px;padding:5px;">
</div>
<form id="ff" method="post"></form>

<div id="selectWin" title="选择应用" class="easyui-window" closed="true" collapsible="false" minimizable="false"  maximizable="false"  style="width:500px;height:500px">
    <div fit="true" class="easyui-layout" style="overflow:scroll">
		<table id="tbAppInfo" class="easyui-datagrid" fitColumns="true" rownumbers="true" singleSelect="true"  
			pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]" 
			selectOnCheck="true" idField="id" toolbar="#searchBar" data-options="onDblClickRow:onDblClickRow" >    
					<thead>
						<tr>
							<th align="left" width="20%" field="apkName">应用名称</th>
							<th align="left" width="30%" field="packageName">应用包名</th>
						</tr>
					 </thead>   
		</table>  
	</div>
</div>

<div id="searchBar" style="padding:3px">
	<span>应用名称</span>
	<input id="appName" class="easyui-textbox" style="width: 155px;"/>
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearchApp();">查询</a>
</div>

<script src='/resources/js/umRetentConfig/umRetentConfig.js'></script>
</body>
</html>